****
* REPLICATION MATERIAL ARTICLE EMANUELE, MARINO, AND ANGELUCCI (ITALIAN POLITICAL SCIENCE REVIEW 2020) 'The congealing of a new cleavage? The evolution of the demarcation bloc in Europe (1979-2019)'
****

use "dataset emanuele marino angelucci 2020.dta"


//demarcation: salience
gen sal_dem = dem_blocv/tv


//Table 2
egen cntry = group(country)
gen time = year - 1983

reg demarcation_bloc time i.cntry
reg dem_blocv time i.cntry


//Figure 2
twoway (scatter demarcation_bloc year, mcolor(black) msize(small)) (lfit demarcation_bloc year, clpattern(solid) clcolor(black) n(8)) (lowess demarcation_bloc year, clpattern(dash) clcolor(black)), ylabel(0 (10)40) graphregion(color(white)) plotregion(fcolor(white)) ytitle("Electoral Strength of Demarcation Bloc") xtitle("Year") xlabel(1984 "1984" 1989 "1989" 1994 "1994" 1999 "1999" 2004 "2004" 2009 "2009" 2014 "2014" 2019 "2019", labsize(small)) legend(off)

//Figure 3
gen country_short=country
replace country_short="AT" if country=="Austria"
replace country_short="BE" if country=="Belgium"
replace country_short="BG" if country=="Bulgaria"
replace country_short="CR" if country=="Croatia"
replace country_short="CY" if country=="Cyprus"
replace country_short="CZ" if country=="Czech Republic"
replace country_short="DK" if country=="Denmark"
replace country_short="EE" if country=="Estonia"
replace country_short="FI" if country=="Finland"
replace country_short="FR" if country=="France"
replace country_short="GE" if country=="Germany"
replace country_short="GR" if country=="Greece"
replace country_short="HU" if country=="Hungary"
replace country_short="IR" if country=="Ireland"
replace country_short="IT" if country=="Italy"
replace country_short="LV" if country=="Latvia"
replace country_short="LT" if country=="Lithuania"
replace country_short="LX" if country=="Luxembourg"
replace country_short="ML" if country=="Malta"
replace country_short="NL" if country=="Netherlands"
replace country_short="PL" if country=="Poland"
replace country_short="PT" if country=="Portugal"
replace country_short="RO" if country=="Romania"
replace country_short="SK" if country=="Slovakia"
replace country_short="SL" if country=="Slovenia"
replace country_short="SP" if country=="Spain"
replace country_short="SW" if country=="Sweden"
replace country_short="UK" if country=="United Kingdom"

graph bar demarcation_bloc (mean) demarcation_bloc if year==2019, over(country_short, sort(1) label(labsize(vsmall))) graphregion(color(white)) plotregion(fcolor(white)) ytitle("Electoral Strength of Demarcation Bloc") bar(1, color(gs5)) blabel(bar, position(outside) format(%9.1f) color(black) size(tiny)) yline(15.1, lwidth(thin) lcolor(gs5) lpattern(dash)) yline (21.185, lwidth(thin) lcolor(gs5) lpattern(solid))

//Figure 4
twoway (scatter dem_blocv year,  mcolor(black) msize(small)) (lfit dem_blocv year, clpattern(solid) clcolor(black) n(8)) (lowess dem_blocv year, clpattern(dash) clcolor(black)), graphregion(color(white)) plotregion(fcolor(white)) xlabel(1984 "1984" 1989 "1989" 1994 "1994" 1999 "1999" 2004 "2004" 2009 "2009" 2014 "2014" 2019 "2019", labsize(small)) legend(off) xtitle("Year") ytitle("Demarcation Bloc volatility")



//Figure 7

//Pre-Typology Salience-BlocV
gen pos_2=3
replace pos_2=6 if country_short=="SP"
replace pos_2=12 if country_short=="PT"
replace pos_2=12 if country_short=="FI"
replace pos_2=4 if country_short=="EE"
replace pos_2=6 if country_short=="SK"
replace pos_2=5 if country_short=="CZ"
replace pos_2=9 if country_short=="HU"

scatter sal_dem dem_blocv if year ==2019, xline(5.14, lcolor(black) lwidth(thin)) yline(0.264161094, lcolor(black) lwidth(thin)) mlabel(country_short) ytitle("Cleavage salience (BlocV / TV)") xtitle("Mobility across the cleavage (BlocV)") graphregion(color(white)) plotregion(fcolor(white)) mcolor(black) mlabcolor(black) mlabsize(vsmall) mlabvposition(pos_2) msize(vsmall) ylabel(0 (0.2)0.8, nogrid)


